package com.nmsl.medicine.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.nmsl.medicine.mapper.StorageOutDetailRecordMapper;
import com.nmsl.medicine.domain.StorageOutDetailRecord;
import com.nmsl.medicine.service.IStorageOutDetailRecordService;

/**
 * 出库记录详情Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-20
 */
@Service
public class StorageOutDetailRecordServiceImpl implements IStorageOutDetailRecordService 
{
    @Autowired
    private StorageOutDetailRecordMapper storageOutDetailRecordMapper;

    /**
     * 查询出库记录详情
     * 
     * @param storageOutDetailId 出库记录详情主键
     * @return 出库记录详情
     */
    @Override
    public StorageOutDetailRecord selectStorageOutDetailRecordByStorageOutDetailId(Long storageOutDetailId)
    {
        return storageOutDetailRecordMapper.selectStorageOutDetailRecordByStorageOutDetailId(storageOutDetailId);
    }

    /**
     * 查询出库记录详情列表
     * 
     * @param storageOutDetailRecord 出库记录详情
     * @return 出库记录详情
     */
    @Override
    public List<StorageOutDetailRecord> selectStorageOutDetailRecordList(StorageOutDetailRecord storageOutDetailRecord)
    {
        List<StorageOutDetailRecord> list=storageOutDetailRecordMapper.selectStorageOutDetailRecordList(storageOutDetailRecord);
        for (int i = 0; i <list.size() ; i++) {
            list.get(i).getAll();
        }
        return list;
    }

    /**
     * 新增出库记录详情
     * 
     * @param storageOutDetailRecord 出库记录详情
     * @return 结果
     */
    @Override
    public int insertStorageOutDetailRecord(StorageOutDetailRecord storageOutDetailRecord)
    {
        return storageOutDetailRecordMapper.insertStorageOutDetailRecord(storageOutDetailRecord);
    }

    /**
     * 修改出库记录详情
     * 
     * @param storageOutDetailRecord 出库记录详情
     * @return 结果
     */
    @Override
    public int updateStorageOutDetailRecord(StorageOutDetailRecord storageOutDetailRecord)
    {
        return storageOutDetailRecordMapper.updateStorageOutDetailRecord(storageOutDetailRecord);
    }

    /**
     * 批量删除出库记录详情
     * 
     * @param storageOutDetailIds 需要删除的出库记录详情主键
     * @return 结果
     */
    @Override
    public int deleteStorageOutDetailRecordByStorageOutDetailIds(Long[] storageOutDetailIds)
    {
        return storageOutDetailRecordMapper.deleteStorageOutDetailRecordByStorageOutDetailIds(storageOutDetailIds);
    }

    /**
     * 删除出库记录详情信息
     * 
     * @param storageOutDetailId 出库记录详情主键
     * @return 结果
     */
    @Override
    public int deleteStorageOutDetailRecordByStorageOutDetailId(Long storageOutDetailId)
    {
        return storageOutDetailRecordMapper.deleteStorageOutDetailRecordByStorageOutDetailId(storageOutDetailId);
    }
}
